soldsCountController = BaseController.extend({
	template:'soldsCount',
	center:'商品销量',
	mainView: 'soldsCount',
	goodsListData:new ReactiveVar([]),
	waitOn:function(){
		let self = this;		
		console.log(this.params.query);
		this.get('common/get-partner-goods',{partner_id:this.params.query.partner_id,level_name:this.params.query.level_name,limit:100}).then(function(res){
			var arr = [];
			var data = res.data;
			for(var i in data){
				arr.push(data[i])
			}
			self.goodsListData.set(arr);
		},function(err){
			console.log(err)
		})
		// /Meteor.subscribe('partnerGoods',this.partner.id, {id:-1},this.partner.level_name);
	},
	onRendered:function(self){
	},
	data: function(){
		let self = this;
		return {
			goods:function(){
				return self.goodsListData.get();
			}
		}
	}
})
